package com.feidee.data.email.dao;

import com.feidee.data.email.model.EmailAddress;
import com.feidee.data.email.model.EmailConf;
import com.feidee.data.email.model.EmailQueryParam;
import com.feidee.data.report.exception.DataDaoException;

import java.util.List;

public interface ConfDao {

  /**
   * 查询所有需要run的Email配置信息
   * @return
   * @throws DataDaoException
   */
  public List<EmailConf> listRunEmail() throws DataDaoException;

  /**
   * 根据email_key查询Email的配置信息
   * @param email_key
   * @return
   * @throws DataDaoException
   */
  public EmailConf getEmailConf(String email_key) throws DataDaoException;

  /**
   * 获得email发送地址
   *
   * @param email_key 邮件的标示
   * @param scene     场景:正常为normal,错误为error
   * @return EmailAddress邮件地址信息
   * @throws DataDaoException
   */
  public EmailAddress getEmailAddress(String email_key, String scene) throws DataDaoException;

  /**
   * 获取Email执行的参数
   * @param email_key
   * @return
   * @throws DataDaoException
   */
  public List<EmailQueryParam> getQueryParam(String email_key) throws DataDaoException;
}
